package com.typy.www.tpay.util;

import com.typy.www.tpay.R;
import com.typy.www.tpay.ui.view.dialog.RedEnvelopeDialog;

import static com.typy.www.tpay.util.GsonUtils.context;

/**
 * Created by 13799 on 2018/7/18.
 */

public class RedEnvelopeDialogUtil {
//    private void showRedEnvelopeDialog(RedEnvelopeDialog mRedEnvelopeDialog, int type) {
//
//    }
//        Logutil.print("type=="+type);
//
////        if (type == 1) {
//            if (mRedEnvelopeDialog == null) {
//                mRedEnvelopeDialog = new RedEnvelopeDialog(context, R.style.WarningDialog);
//            }
//            mRedEnvelopeDialog.setListener(new RedEnvelopeDialog.OnDismantlingListener() {
//                @Override
//                public void onDismantlingRespon(String id) {
//                    if (mRedEnvelopeDialog != null && mRedEnvelopeDialog.isShowing()) {
//                        mRedEnvelopeDialog.dismiss();
//                    }
//                    //拆红包
//                    getEnvelopesMoney();
//                }
//            });
//            mRedEnvelopeDialog.updataView("", "红包来袭，手速要快！");
//            mRedEnvelopeDialog.show();
//        } else if (type == 2) {
//            if (mRedEnvelopeResultDialog == null) {
//                mRedEnvelopeResultDialog = new RedEnvelopeResultDialog(context, R.style.WarningDialog);
//            }
//            mRedEnvelopeResultDialog.updateView(mTimeRedEnvelopes.getTimedDetail());
//            mRedEnvelopeResultDialog.show();
//        } else if (type == 3) {
//            if (mRedEnvelopeResultDialog == null) {
//                mRedEnvelopeResultDialog = new RedEnvelopeResultDialog(context, R.style.WarningDialog);
//            }
//            RedEnvelopeVm vm = new RedEnvelopeVm();
//            vm.setCn("万水千山总是情，明天来抢行不行！今日红包已抢完，下一场记得及时参与哦！");
//            vm.setLeadEnd(true);
//            mRedEnvelopeResultDialog.updateView(vm);
//            mRedEnvelopeResultDialog.show();
//        }else if (type == 4) {
//            String msg="";
//            if(mTimeRedEnvelopes!=null&&mTimeRedEnvelopes.getTimedDetail()!=null){
//                msg=mTimeRedEnvelopes.getTimedDetail().getCn();
//            }else{
//                msg="禀告小主！您的累计金额未达到定时抢红包参与门槛100元，请继续努力！（房源上传、跟进、金融提单...每一步都返现！）";
//            }
//            SyDialogHelper.showWarningDlg(getActivity(), "提示！", msg, "确定");
//        }
//    }
}
